package com.iu.eblood.model;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the ROLE database table.
 * 
 */
@Entity
public class Role implements Serializable {
	private static final long serialVersionUID = 1L;
	private long roleid;
	private Timestamp createddate;
	private Timestamp deleteddate;
	private String isactive;
	private String rolename;
	private List<Userrole> userroles;

    public Role() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public long getRoleid() {
		return this.roleid;
	}

	public void setRoleid(long roleid) {
		this.roleid = roleid;
	}


	public Timestamp getCreateddate() {
		return this.createddate;
	}

	public void setCreateddate(Timestamp createddate) {
		this.createddate = createddate;
	}


	public Timestamp getDeleteddate() {
		return this.deleteddate;
	}

	public void setDeleteddate(Timestamp deleteddate) {
		this.deleteddate = deleteddate;
	}


	public String getIsactive() {
		return this.isactive;
	}

	public void setIsactive(String isactive) {
		this.isactive = isactive;
	}


	public String getRolename() {
		return this.rolename;
	}

	public void setRolename(String rolename) {
		this.rolename = rolename;
	}


	//bi-directional many-to-one association to Userrole
	@OneToMany(mappedBy="role")
	public List<Userrole> getUserroles() {
		return this.userroles;
	}

	public void setUserroles(List<Userrole> userroles) {
		this.userroles = userroles;
	}
	
}